<template>
    <div>
     <h1>门店统计列表</h1>
     <table class="table table-bordered">
        <tbody>
            <tr class="bg-primary">
                <td>编号</td>
                <td>会员</td>
                <td>门店</td>
                <td>预消费</td>
                <td>实际消费</td>
                <td>支付时间</td>
                <td>操作</td>
            </tr>
            <tr v-for="item in data.list":key="item.Id">
                <td>{{item.Id}}</td>
                <td>{{item.MemberId}}</td>
                <td>{{item.Sid}}</td>
                <td>{{item.Moneys}}</td>
                <td>{{item.PayMoney}}</td>
                <td>{{item.PayTime}}</td>
                <td>
                    <input type="button"value="删除" class="btn btn-success">
                    <input type="button"value="修改" class="btn btn-danger">
                </td>
            </tr>
        </tbody>
     </table>
    </div>
</template>

<script setup lang="ts">
//响应式数据
import {ref,reactive,onMounted} from 'vue';
import axios from 'axios';
import moment from 'moment';
//跳转
import {useRouter,useRoute} from 'vue-router';
const router=useRouter();
const route=useRoute();

//向后端传递的数据
let info:any=reactive({
    pageindex:1,
    pagesize:2,
})
//接收后端返回的数据
let data:any=reactive({
    list:[],
    totalCount:0,
    totalPage:0,
})

onMounted(()=>{
    getcount();
})
const getcount=()=>{
    axios({
        url:'https://localhost:7193/api/Shop/GetShopCount',
        method:'get',
        params:info,
    })
    .then(res=>{
        console.log(res);
        Object.assign(data,res.data);
    })

}
</script>

<style scoped>

</style>    